#ifndef _FUNCTION_H_
#define _FUNCTION_H_

#include <jni.h>
#include "jni-base.h"


jlong initNativeObject(JNIEnv *env, jobject thiz);
jint jniCalc(JNIEnv *env, jobject thiz, jlong address, jstring function_text, jobject ret);
jobject jniJLexerGetSpace(JNIEnv *env, jobject thiz, jlong nativeAddress, jstring function_text, jfloatArray boundaries, jfloat epsilon, jboolean isNormal);
jint jniGetDerivative(JNIEnv *env, jobject thiz);
void jniRelease(JNIEnv *env, jobject thiz);
jlong jniGetError(JNIEnv *env, jobject thiz, jlong address);

static const JNINativeMethod functionMethods[] = {
	{"jniInitNativeObject","()J",(void*)initNativeObject},
	{"jniCalc", "(JLjava/lang/String;Lsimplemath/math/ReturnVal;)I", (void*)jniCalc},
	{"jniGetSpace", "(JLjava/lang/String;[FFZ)Ljava/util/ArrayList;", (void*)jniJLexerGetSpace},
	{"jniGetDerivative", "()I", (void*)jniGetDerivative},
	{"jniGetError", "(J)J", (void*)jniGetError},
	{"jniRelease", "()V", (void*)jniRelease}
};

#endif
